<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <!-- key="..." 是为了区分代码是否复用，如果复用则名字相同 -->
    <div id="app">
        <span v-if='isShow'>
            <label for="username">用户账号:
                <input type="text" name="username" id="username" placeholder="用户账号" key='username'> <br>
            </label>
           <label for="password">用户密码:
            <input type="text" name="password" id="password" placeholder="密码" key = 'password'> <br>
           </label>
        </span>
        <span v-else>
            <label for="email">邮箱账号:
                <input type="text" name="email" id="email" placeholder="邮箱账号" key="email"> <br>
            </label>
            <label for="emailpwd">邮箱密码:
                <input type="text" name="emailpwd" id="emailpwd" placeholder="密码" key='emailpwd'> <br>
            </label>
        </span>
        <button @click = 'isShow = !isShow'>切换登录方式</button>
    </div>
    <script src='../js/vue.js'></script>
    <script>
        const app = new Vue({
            el: '#app',
            data: {
              isShow:true
            },
            methods: {

            }
        })
    </script>
</body>

</html>